package com.reverie.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author Rui.Zhou
 * @since 2024-02-03
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("mh_coupon")
public class Coupon implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "cp_id", type = IdType.AUTO)
    private Long cpId;

    /**
     * 优惠券号，从10000000开始
     */
    private String couponId;

    private Integer userId;

    private String name;

    private String type;

    private String value;

    @TableField(value = "c_desc")
    private String couponDesc;

    /**
     * 有效期
     */
    private Integer expiresStart;

    /**
     * 是否已使用
     */
    private Boolean isUsed;

    /**
     * 使用时间
     */
    private Integer usedAt;

    /**
     * 商品ID
     */
    private Integer goodsId;

    /**
     * 货品ID
     */
    private Integer productId;

    /**
     * 订单ID
     */
    private Integer orderId;

    /**
     * 限制次数
     */
    private Integer limitTimes;

    /**
     * 更新时间
     */
    private Integer modifiedAt;

    /**
     * 是否删除
     */
    private Boolean isDeleted;

    /**
     * 是否通用优惠券
     */
    private Boolean isCommon;

    private Integer expiresEnd;

    /**
     * 从微信上拉取卡券的微信返回的id
     */
    private String cardId;

    private Boolean state;

    @TableField(exist = false)
    private String expiresStartTime;
    @TableField(exist = false)
    private String expiresEndTime;
    @TableField(exist = false)
    private String memberPhone;
    @TableField(exist = false)
    private Integer generateNum;
    @TableField(exist = false)
    private String startChar;
}
